import '/@/design/index.less';
import 'virtual:windi.css'

import { createApp } from 'vue'
import App from './App.vue'

import { setupI18n } from './locales/setupI18n'

import { router, setupRouter } from './router'
import { registerGlobComp } from './components/registerGlobComp';

// Importing on demand in local development will increase the number of browser requests by around 20%.
// This may slow down the browser refresh speed.
// Therefore, only enable on-demand importing in production environments .
if (import.meta.env.DEV) {
    import('ant-design-vue/dist/antd.less');
}

async function bootstrap() {
    const app = createApp(App)

    // Register global components
    registerGlobComp(app);

    await setupI18n(app)

    setupRouter(app)

    app.mount('#app')
}

bootstrap()